package tld.course.lesson3 
{
	import flash.display.Sprite;
	
	/**
	 * ...
	 * @author wvxvw
	 */
	public class Puzzle extends Sprite
	{
		
		public function Puzzle() 
		{
			super();
			trace(this.addSpaces(-111112233445566.778899));
		}
		
private function addSpaces(input:Number):String
{
	var result:String = "";
	var sign:String = input < 0 ? "-" : "";
	
	input = Math.abs(input);
	for (; Math.abs(input) > 1; input /= 1000)
		result = int(input % 1000) + " " + result;
	return sign + result;
}
	}
}